<?php

namespace Yolo\Errors\Exceptions;

use Yolo\Errors\ResponseError;

class InvalidRPCTypeException extends YoloException
{
    protected string $type = 'system';

    protected string $symbol = 'invalid_rpc_type';

    protected $message = 'Invalid rpc type.';
    public function __construct(array $metadata = [])
    {
        $this->code = EErrorCode::INVALID_RPC_TYPE->value;
        parent::__construct($this->message, $this->code);
        $this->systemException = new ResponseError(
            $this->type,
            $this->symbol,
            $this->message,
            $this->code
        );
        $this->systemException->setHttpStatus(400)
            ->setMetadata($metadata);
    }
}